import Vue from 'vue'
import App from './App.vue'
import router from './router/router.js'
import store from './store/store.js'
import axios from 'axios'
import VueAxios from 'vue-axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './plugins/element.js'
import Vant from 'vant';
import 'vant/lib/index.css';

import VueLazyLoad from "vue-lazyload"
Vue.use(VueLazyLoad, {
  error: "./static/a1.jpg",
  loading: "./images/loading.gif"
})
Vue.use(Vant);

Vue.use(ElementUI);

Vue.config.productionTip = false
Vue.use(VueAxios, axios)

new Vue({
  router,
  store,
  render: h => h(App),
  created() {
    let arr = JSON.parse(localStorage.getItem("arr"));
    if (arr) {
      this.$store.commit("location", arr);
    }
  }

}).$mount('#app')